Allow exposure compression across GravityNotify events to improve the
authorOwen Taylor <otaylor@redhat.com>
Thu, 28 Jan 1999 03:48:04 +0000 (03:48 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Thu, 28 Jan 1999 03:48:04 +0000 (03:48 +0000)
Wed Jan 27 22:51:23 1999  Owen Taylor  <otaylor@redhat.com>

* gdk/gdkevents.c (expose_predicate): Allow exposure
 compression across GravityNotify events to improve
   the appearance of a GTK+ window unshading.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gdk/gdkevents.c
gdk/x11/gdkevents-x11.c

index 9a3a39a0eaaee1f84e08d5b527dbfe9850485516..0a09c25045ecd2eea7ac1e0fca0ffe8461d5c521 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Wed Jan 27 22:51:23 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkevents.c (expose_predicate): Allow exposure
+        compression across GravityNotify events to improve
+        the appearance of a GTK+ window unshading.
+
 Wed Jan 27 21:56:07 1999  Owen Taylor  <otaylor@redhat.com>
 
         [ patch from Takashi Matsuda <matsu@arch.comp.kyutech.ac.jp> ]
@@ -8,7 +14,7 @@ Wed Jan 27 21:56:07 1999  Owen Taylor  <otaylor@redhat.com>
        input method immediately, and only if that fails,
        register than instantiate callback.
 
-       * gdk/gdkentry.c: Some tweaks to make sure that we
+       * gtk/gtkentry.c: Some tweaks to make sure that we
        only get and set the IC attributes when appropriate.
        
 Wed Jan 27 20:08:54 1999  Owen Taylor  <otaylor@redhat.com>
index 9a3a39a0eaaee1f84e08d5b527dbfe9850485516..0a09c25045ecd2eea7ac1e0fca0ffe8461d5c521 100644 (file)
@@ -1,3 +1,9 @@
+Wed Jan 27 22:51:23 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkevents.c (expose_predicate): Allow exposure
+        compression across GravityNotify events to improve
+        the appearance of a GTK+ window unshading.
+
 Wed Jan 27 21:56:07 1999  Owen Taylor  <otaylor@redhat.com>
 
         [ patch from Takashi Matsuda <matsu@arch.comp.kyutech.ac.jp> ]
@@ -8,7 +14,7 @@ Wed Jan 27 21:56:07 1999  Owen Taylor  <otaylor@redhat.com>
        input method immediately, and only if that fails,
        register than instantiate callback.
 
-       * gdk/gdkentry.c: Some tweaks to make sure that we
+       * gtk/gtkentry.c: Some tweaks to make sure that we
        only get and set the IC attributes when appropriate.
        
 Wed Jan 27 20:08:54 1999  Owen Taylor  <otaylor@redhat.com>
index 9a3a39a0eaaee1f84e08d5b527dbfe9850485516..0a09c25045ecd2eea7ac1e0fca0ffe8461d5c521 100644 (file)
@@ -1,3 +1,9 @@
+Wed Jan 27 22:51:23 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkevents.c (expose_predicate): Allow exposure
+        compression across GravityNotify events to improve
+        the appearance of a GTK+ window unshading.
+
 Wed Jan 27 21:56:07 1999  Owen Taylor  <otaylor@redhat.com>
 
         [ patch from Takashi Matsuda <matsu@arch.comp.kyutech.ac.jp> ]
@@ -8,7 +14,7 @@ Wed Jan 27 21:56:07 1999  Owen Taylor  <otaylor@redhat.com>
        input method immediately, and only if that fails,
        register than instantiate callback.
 
-       * gdk/gdkentry.c: Some tweaks to make sure that we
+       * gtk/gtkentry.c: Some tweaks to make sure that we
        only get and set the IC attributes when appropriate.
        
 Wed Jan 27 20:08:54 1999  Owen Taylor  <otaylor@redhat.com>
index 9a3a39a0eaaee1f84e08d5b527dbfe9850485516..0a09c25045ecd2eea7ac1e0fca0ffe8461d5c521 100644 (file)
@@ -1,3 +1,9 @@
+Wed Jan 27 22:51:23 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkevents.c (expose_predicate): Allow exposure
+        compression across GravityNotify events to improve
+        the appearance of a GTK+ window unshading.
+
 Wed Jan 27 21:56:07 1999  Owen Taylor  <otaylor@redhat.com>
 
         [ patch from Takashi Matsuda <matsu@arch.comp.kyutech.ac.jp> ]
@@ -8,7 +14,7 @@ Wed Jan 27 21:56:07 1999  Owen Taylor  <otaylor@redhat.com>
        input method immediately, and only if that fails,
        register than instantiate callback.
 
-       * gdk/gdkentry.c: Some tweaks to make sure that we
+       * gtk/gtkentry.c: Some tweaks to make sure that we
        only get and set the IC attributes when appropriate.
        
 Wed Jan 27 20:08:54 1999  Owen Taylor  <otaylor@redhat.com>
index 9a3a39a0eaaee1f84e08d5b527dbfe9850485516..0a09c25045ecd2eea7ac1e0fca0ffe8461d5c521 100644 (file)
@@ -1,3 +1,9 @@
+Wed Jan 27 22:51:23 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkevents.c (expose_predicate): Allow exposure
+        compression across GravityNotify events to improve
+        the appearance of a GTK+ window unshading.
+
 Wed Jan 27 21:56:07 1999  Owen Taylor  <otaylor@redhat.com>
 
         [ patch from Takashi Matsuda <matsu@arch.comp.kyutech.ac.jp> ]
@@ -8,7 +14,7 @@ Wed Jan 27 21:56:07 1999  Owen Taylor  <otaylor@redhat.com>
        input method immediately, and only if that fails,
        register than instantiate callback.
 
-       * gdk/gdkentry.c: Some tweaks to make sure that we
+       * gtk/gtkentry.c: Some tweaks to make sure that we
        only get and set the IC attributes when appropriate.
        
 Wed Jan 27 20:08:54 1999  Owen Taylor  <otaylor@redhat.com>
index 9a3a39a0eaaee1f84e08d5b527dbfe9850485516..0a09c25045ecd2eea7ac1e0fca0ffe8461d5c521 100644 (file)
@@ -1,3 +1,9 @@
+Wed Jan 27 22:51:23 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkevents.c (expose_predicate): Allow exposure
+        compression across GravityNotify events to improve
+        the appearance of a GTK+ window unshading.
+
 Wed Jan 27 21:56:07 1999  Owen Taylor  <otaylor@redhat.com>
 
         [ patch from Takashi Matsuda <matsu@arch.comp.kyutech.ac.jp> ]
@@ -8,7 +14,7 @@ Wed Jan 27 21:56:07 1999  Owen Taylor  <otaylor@redhat.com>
        input method immediately, and only if that fails,
        register than instantiate callback.
 
-       * gdk/gdkentry.c: Some tweaks to make sure that we
+       * gtk/gtkentry.c: Some tweaks to make sure that we
        only get and set the IC attributes when appropriate.
        
 Wed Jan 27 20:08:54 1999  Owen Taylor  <otaylor@redhat.com>
index 9a3a39a0eaaee1f84e08d5b527dbfe9850485516..0a09c25045ecd2eea7ac1e0fca0ffe8461d5c521 100644 (file)
@@ -1,3 +1,9 @@
+Wed Jan 27 22:51:23 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkevents.c (expose_predicate): Allow exposure
+        compression across GravityNotify events to improve
+        the appearance of a GTK+ window unshading.
+
 Wed Jan 27 21:56:07 1999  Owen Taylor  <otaylor@redhat.com>
 
         [ patch from Takashi Matsuda <matsu@arch.comp.kyutech.ac.jp> ]
@@ -8,7 +14,7 @@ Wed Jan 27 21:56:07 1999  Owen Taylor  <otaylor@redhat.com>
        input method immediately, and only if that fails,
        register than instantiate callback.
 
-       * gdk/gdkentry.c: Some tweaks to make sure that we
+       * gtk/gtkentry.c: Some tweaks to make sure that we
        only get and set the IC attributes when appropriate.
        
 Wed Jan 27 20:08:54 1999  Owen Taylor  <otaylor@redhat.com>
index 75dd891ddd23246cbb881c778b07fb2ea7b79c09..e83b05086fa0b3c0258b849f42fff68976b26b57 100644 (file)
@@ -378,12 +378,22 @@ expose_predicate (Display *display, XEvent *xevent, XPointer arg)
 {
   GdkExposeInfo *info = (GdkExposeInfo *)arg;
 
-  if (xevent->xany.type != Expose)
+  /* Compressing across GravityNotify events is safe, because
+   * we completely ignore them, so they can't change what
+   * we are going to draw. Compressing across GravityNotify
+   * events is necessay because during window-unshading animation
+   * we'll get a whole bunch of them interspersed with
+   * expose events.
+   */
+  if ((xevent->xany.type != Expose) && 
+      (xevent->xany.type != GravityNotify))
     {
       info->seen_nonmatching = TRUE;
     }
 
-  if (info->seen_nonmatching || (xevent->xany.window != info->window))
+  if (info->seen_nonmatching ||
+      (xevent->xany.type != Expose) ||
+      (xevent->xany.window != info->window))
     return FALSE;
   else
     return TRUE;
index 75dd891ddd23246cbb881c778b07fb2ea7b79c09..e83b05086fa0b3c0258b849f42fff68976b26b57 100644 (file)
@@ -378,12 +378,22 @@ expose_predicate (Display *display, XEvent *xevent, XPointer arg)
 {
   GdkExposeInfo *info = (GdkExposeInfo *)arg;
 
-  if (xevent->xany.type != Expose)
+  /* Compressing across GravityNotify events is safe, because
+   * we completely ignore them, so they can't change what
+   * we are going to draw. Compressing across GravityNotify
+   * events is necessay because during window-unshading animation
+   * we'll get a whole bunch of them interspersed with
+   * expose events.
+   */
+  if ((xevent->xany.type != Expose) && 
+      (xevent->xany.type != GravityNotify))
     {
       info->seen_nonmatching = TRUE;
     }
 
-  if (info->seen_nonmatching || (xevent->xany.window != info->window))
+  if (info->seen_nonmatching ||
+      (xevent->xany.type != Expose) ||
+      (xevent->xany.window != info->window))
     return FALSE;
   else
     return TRUE;